package com.ruoyi.web.convert.terminalHistoryData;

import com.ruoyi.datastatistics.domain.TerminalHistoryData;
import com.ruoyi.web.entity.RealtimeGatherData2;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface TerminalHistoryDataConvert {
    TerminalHistoryDataConvert INSTANCE = Mappers.getMapper(TerminalHistoryDataConvert.class);
    @Mapping(source = "terminalId", target = "UserTermianlID")
    @Mapping(source = "readDate", target = "TerminalTime")
    @Mapping(source = "readNumber", target = "ReadNumber")
    @Mapping(source = "totalFlow", target = "TotalFlow")
    @Mapping(source = "reverseNumber", target = "ReverseNumber")
    @Mapping(source = "instantNumber", target = "InstantNumber")
    @Mapping(source = "pressure", target = "Pressure")
    RealtimeGatherData2 convert(TerminalHistoryData bean);


    List<RealtimeGatherData2> convert(List<TerminalHistoryData> bean);
}
